import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("sys_dept",{schema:"nest-mall" } )
export class SysDept {

    @PrimaryGeneratedColumn({
        type:"bigint", 
        name:"dept_id"
        })
    deptId:string;
        

    @Column("bigint",{ 
        nullable:true,
        name:"parent_id"
        })
    parentId:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        name:"name"
        })
    name:string | null;
        

    @Column("int",{ 
        nullable:true,
        name:"order_num"
        })
    orderNum:number | null;
        

    @Column("tinyint",{ 
        nullable:true,
        default: () => "'0'",
        name:"del_flag"
        })
    delFlag:number | null;
        
}
